#define _CRT_SECURE_NO_WARNINGS 1

#include "Myvector.h"
#include<iostream>

using namespace kia;
using namespace std;
int main()
{
	//vector<int> v1;
	//vector<int> v2(1, 1);
	//cout << v2.size() << endl;
	///*v2.reserve(15);
	//cout << v2.size() << endl;
	//auto it = v2.begin();
	//while (it != v2.end())
	//{
	//	cout << *it << endl;
	//	++it;
	//}*/
	//v2.push_back(3);
	//v2.push_back(4);
	//v2.push_back(5);


	//vector<int> v3;
	//v3.push_back(5);
	//v3.push_back(5);
	//v3.push_back(5);
	//v3.push_back(5);
	//v2 = v3;
	//for (const auto e : v2)
	//{
	//	cout << e << ' ';
	//}
	//cout << endl;
	//cout << v2.capacity() << endl;
	///*vector<int> v3(v2.begin(), v2.end());
	//for (const auto e : v3)
	//{
	//	cout << e << ' ';
	//}
	//cout << endl;*/
	/*vector<int> v1;
	v1.push_back(1);
	v1.push_back(2);
	v1.push_back(3);
	for (const auto e : v1)
	{
		cout << e << ' ';
	}
	cout << endl;
	vector<int> v2(v1);
	for (const auto e : v2)
	{
		cout << e << ' ';
	}
	cout << endl;
	vector<int> v3;
	v3 = v1;
	v3.push_back(10);
	v3.push_back(100);
	v3.push_back(1000);
	v3.push_back(20);
	for (const auto e : v3)
	{
		cout << e << ' ';
	}
	cout << endl;

	vector<int> v4(v3.begin(), v3.end());
	for (const auto e : v4)
	{
		cout << e << ' ';
	}
	cout << endl;
	v4.resize(1);
	for (const auto e : v4)
	{
		cout << e << ' ';
	}
	v4.push_back(6);
	v4.push_back(6);
	v4.push_back(6);
	v4.push_back(6);
	cout << endl;
	cout << v4.size() << endl;
	for (int i = 0; i < v4.size(); ++i)
	{
		v4[i]++;
		cout << v4[i] << ' ';
	}
	cout << endl;
	v4.pop_back();
	v4.pop_back();
	v4.pop_back();

	const vector<int> v5(v4);
	for (int i = 0; i < v5.size(); ++i)
	{
		cout << v5[i] << ' ';
	}
	cout << endl;*/
	/*vector<int > v1;
	v1.push_back(1);
	v1.push_back(1);
	v1.push_back(1);
	v1.push_back(1);
	v1.push_back(1);
	vector<int> v2;
	v2.push_back(2);
	v2.push_back(2);
	v2.push_back(2);
	v2.swap(v1);
	
	for (const auto e : v1)
	{
		cout << e << ' ';
	}
	cout << endl;

	v2.insert(v2.begin()+1, 99);
	v2.insert(v2.begin(), 200);

	for (const auto e : v2)
	{
		cout << e << ' ';
	}
	cout << endl;*/
	int arr[] = { 1,2,3,4,5,6,7 };
	vector<int> v1(arr,arr+7);
	/*auto it = v1.begin();*/
	/*for (int i = 0; i < 7; ++i)
	{
		it = v1.erase(it);
		for (const auto e : v1)
		{
			cout << e << ' ';
		}
		cout << endl;
	}*/
	/*v1.erase(v1.end() - 1);
	for (const auto e : v1)
	{
		cout << e << ' ';
	}
	cout << endl;
	v1.erase(v1.begin() + 2);
	for (const auto e : v1)
	{
		cout << e << ' ';
	}
	cout << endl;
	v1.erase(v1.begin());
	for (const auto e : v1)
	{
		cout << e << ' ';
	}
	cout << endl;*/
	
	/*auto it = v1.rbegin();
	while (it != v1.rend())
	{
		cout << *it << ' ';
		++it;
	}
	cout << endl;
	const vector<int> v2(v1);
	auto it2 = v2.rbegin();
	while (it2 != v2.rend())
	{
		cout << *it2 << ' ';
		*it2 = 1;
		++it2;
	}
	cout << endl;*/
	return 0;
}